Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Adds check for license header #3203

Conversation

konstantinabl
Copy link
Collaborator

@konstantinabl konstantinabl commented Nov 1, 2024

Description:

Changes

Added a new package eslint-plugin-header that implements a rule to check the presence of a particular header.

Technical Details

The rule allow for the usage of regex for certain parts of the header. In our case I have added a regex for the line containing dates.
The regex will work for strings with a single date:

 * Copyright (C) 2024 Hedera Hashgraph, LLC

or a dates defining some period

 * Copyright (C) 2022-2024 Hedera Hashgraph, LLC

Related issue(s):

Fixes #3192

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Copy link

github-actions bot commented Nov 1, 2024

Test Results

 23 files  + 3  304 suites  +56   1h 11m 38s ⏱️ + 39m 47s
610 tests + 1  601 ✅  -  2  4 💤 ±0  5 ❌ +3 
726 runs  +27  716 ✅ +23  4 💤 ±0  6 ❌ +4 

For more details on these failures, see this check.

Results for commit 7cfd0c5. ± Comparison against base commit 27a10dc.

This pull request removes 7 and adds 8 tests. Note that renamed tests count towards both.
"before all" hook in "@api-batch-2 RPC Server Acceptance Tests" ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-2 RPC Server Acceptance Tests "before all" hook in "@api-batch-2 RPC Server Acceptance Tests"
@release fail "eth_getTransactionReceipt" on precheck with wrong nonce error when sending a tx with a higher nonce ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-1 RPC Server Acceptance Tests RPC Server Acceptance Tests Transaction related RPC Calls Prechecks @release fail "eth_getTransactionReceipt" on precheck with wrong nonce error when sending a tx with a higher nonce
Should eventually exhaust the total HBAR limits after many large contract deployments by different tiered users ‑ RPC Server Acceptance Tests Acceptance tests @hbarlimiter HBAR Limiter Acceptance Tests HBAR Rate Limit Tests HBAR Rate Limit For Different Spending Plan Tiers @hbarlimiter-batch2 Multiple users with different tiers Should eventually exhaust the total HBAR limits after many large contract deployments by different tiered users
should create a BASIC spending plan for a new user and use the same plan on second transaction and different plan on third transaction from another user ‑ RPC Server Acceptance Tests Acceptance tests @hbarlimiter HBAR Limiter Acceptance Tests HBAR Rate Limit Tests HBAR Rate Limit For Different Spending Plan Tiers @hbarlimiter-batch1 BASIC Tier should create a BASIC spending plan for a new user and use the same plan on second transaction and different plan on third transaction from another user
should eventually exhaust the hbar limit for a BASIC user after multiple deployments of large contracts ‑ RPC Server Acceptance Tests Acceptance tests @hbarlimiter HBAR Limiter Acceptance Tests HBAR Rate Limit Tests HBAR Rate Limit For Different Spending Plan Tiers @hbarlimiter-batch1 BASIC Tier should eventually exhaust the hbar limit for a BASIC user after multiple deployments of large contracts
should execute "eth_sendRawTransaction" and deploy a contract with more than max transaction fee ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-1 RPC Server Acceptance Tests RPC Server Acceptance Tests Transaction related RPC Calls should execute "eth_sendRawTransaction" and deploy a contract with more than max transaction fee
should individually update amountSpents of different spending plans ‑ RPC Server Acceptance Tests Acceptance tests @hbarlimiter HBAR Limiter Acceptance Tests HBAR Rate Limit Tests HBAR Rate Limit For Different Spending Plan Tiers @hbarlimiter-batch2 Multiple users with different tiers should individually update amountSpents of different spending plans
Should eventually exhaust the total HBAR limits after many large contract deployments ‑ RPC Server Acceptance Tests Acceptance tests @hbarlimiter HBAR Limiter Acceptance Tests HBAR Rate Limit Tests HBAR Rate Limit For Different Spending Plan Tiers @hbarlimiter-batch1 Multiple users with different tiers Should eventually exhaust the total HBAR limits after many large contract deployments
calls createFungibleToken with custom fees ‑ RPC Server Acceptance Tests Acceptance tests @precompile-calls Tests for eth_call with HTS Create HTS token via direct call to Hedera Token service calls createFungibleToken with custom fees
calls createFungibleToken ‑ RPC Server Acceptance Tests Acceptance tests @precompile-calls Tests for eth_call with HTS Create HTS token via direct call to Hedera Token service calls createFungibleToken
calls createNonFungibleToken with fees ‑ RPC Server Acceptance Tests Acceptance tests @precompile-calls Tests for eth_call with HTS Create HTS token via direct call to Hedera Token service calls createNonFungibleToken with fees
calls createNonFungibleToken ‑ RPC Server Acceptance Tests Acceptance tests @precompile-calls Tests for eth_call with HTS Create HTS token via direct call to Hedera Token service calls createNonFungibleToken
should create a BASIC spending plan for a new user and use the same plan on second transaction and different plan on third transaction from another user ‑ RPC Server Acceptance Tests Acceptance tests @hbarlimiter HBAR Limiter Acceptance Tests HBAR Rate Limit Tests HBAR Rate Limit For Different Spending Plan Tiers @hbarlimiter-batch2 BASIC Tier should create a BASIC spending plan for a new user and use the same plan on second transaction and different plan on third transaction from another user
should eventually exhaust the hbar limit for a BASIC user after multiple deployments of large contracts ‑ RPC Server Acceptance Tests Acceptance tests @hbarlimiter HBAR Limiter Acceptance Tests HBAR Rate Limit Tests HBAR Rate Limit For Different Spending Plan Tiers @hbarlimiter-batch2 BASIC Tier should eventually exhaust the hbar limit for a BASIC user after multiple deployments of large contracts
should individually update amountSpents of different spending plans ‑ RPC Server Acceptance Tests Acceptance tests @hbarlimiter HBAR Limiter Acceptance Tests HBAR Rate Limit Tests HBAR Rate Limit For Different Spending Plan Tiers @hbarlimiter-batch1 Multiple users with different tiers should individually update amountSpents of different spending plans

♻️ This comment has been updated with latest results.

@quiet-node quiet-node added the internal For changes that affect the project's internal workings but not its outward-facing functionality. label Nov 6, 2024
Signed-off-by: Konstantina Blazhukova <[email protected]>
@konstantinabl konstantinabl force-pushed the 3192-chore-add-custom-rule-to-check-the-existence-of-license-header-in-each-file branch from 497d7a5 to dea510c Compare November 18, 2024 10:09
Signed-off-by: Konstantina Blazhukova <[email protected]>
Signed-off-by: Konstantina Blazhukova <[email protected]>
Signed-off-by: Konstantina Blazhukova <[email protected]>
@konstantinabl konstantinabl marked this pull request as ready for review December 10, 2024 21:13
@konstantinabl konstantinabl requested a review from a team as a code owner December 10, 2024 21:13
@konstantinabl konstantinabl added this to the 0.62.0 milestone Dec 10, 2024
Copy link
Contributor

@acuarica acuarica left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Collaborator

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, one question to confirm

.eslintrc.js Show resolved Hide resolved
@konstantinabl konstantinabl requested a review from a team December 11, 2024 09:07
@konstantinabl konstantinabl merged commit b58d891 into main Dec 11, 2024
48 of 51 checks passed
@konstantinabl konstantinabl deleted the 3192-chore-add-custom-rule-to-check-the-existence-of-license-header-in-each-file branch December 11, 2024 09:12
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.96%. Comparing base (27a10dc) to head (7cfd0c5).
Report is 27 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3203      +/-   ##
==========================================
+ Coverage   78.92%   84.96%   +6.03%     
==========================================
  Files          48       69      +21     
  Lines        3606     4655    +1049     
  Branches      841     1042     +201     
==========================================
+ Hits         2846     3955    +1109     
+ Misses        422      396      -26     
+ Partials      338      304      -34     
Flag Coverage Δ
config-service 98.14% <ø> (ø)
relay 78.75% <ø> (+0.12%) ⬆️
server 83.28% <ø> (?)
ws-server 36.66% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 47 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal For changes that affect the project's internal workings but not its outward-facing functionality.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

chore: add custom rule to check the existence of license header in each file
4 participants